package entity;

import java.util.HashMap;
import java.util.Map;

/**
 * describe 模版对应存放目录集合
 * author wencong 2022/3/3
 */
public class VmEntity {

    public static Map<String, String[]> getVm(String projectName) {
        return switch (projectName) {
//            case "duroAdminAsp" -> duroAdminAspVmMap;
            case "duroAdminAsp" -> duroErpAspVmMap;
            case "hmErpCloudAsp" -> hmErpCloudAspVmMap;
            default -> new HashMap<>();
        };
    }
    private static String duroAspPath = "/Users/wencong/Documents/workspace/vs-workspace/duro-asp";
    private static String duroVuePath = "/Users/wencong/Documents/workspace/vscode-workspace/duro-vue";
    private static String hmErpCloudAspPath = "/Users/wencong/Documents/workspace/vs-workspace/hm_erp_cloud_asp";
    private static String hmErpCloudVuePath = "/Users/wencong/Documents/workspace/vscode-workspace/hm_erp_cloud_vue";
    // 设置生成路径为null 将生成到默认路径，当前项目file文件夹下
    public static Map<String, String[]> duroAdminAspVmMap = new HashMap<>() {{
        put("Entity.vm", new String[]{"entity", "", ".cs", duroAspPath + "/common"});
        put("Service.vm", new String[]{"service", "Service", ".cs", duroAspPath + "/adminasp/Controllers"});
        put("ServiceImpl.vm", new String[]{"service/impl", "Impl", ".cs", duroAspPath + "/adminasp/Controllers"});
        put("duroadminasp/Controller.vm", new String[]{"controller", "Controller", ".cs", duroAspPath + "/adminasp/Controllers"});
        put("Services.vm", new String[]{"service", "", ".ts", null});
        put("Views.vm", new String[]{"views", "", ".vue", null});
        put("Sql.vm", new String[]{"sql", "Sql", ".sql", null});
    }};
    public static Map<String, String[]> duroErpAspVmMap = new HashMap<>() {{
        put("Entity.vm", new String[]{"entity", "", ".cs", null});
        put("Service.vm", new String[]{"service", "Service", ".cs", null});
        put("ServiceImpl.vm", new String[]{"service/impl", "Impl", ".cs", null});
        put("duroadminasp/Controller.vm", new String[]{"controller", "Controller", ".cs", null});
        put("Services.vm", new String[]{"service", "", ".ts", null});
        put("Views.vm", new String[]{"views", "", ".vue", null});
        put("Sql.vm", new String[]{"sql", "Sql", ".sql", null});
    }};
    public static Map<String, String[]> hmErpCloudAspVmMap = new HashMap<>() {{
        put("Entity.vm", new String[]{"entity", "", ".cs", "/Users/wencong/Documents/project-pro/erp-demo/erp-net/basics"});
        put("Service.vm", new String[]{"service", "Service", ".cs", "/Users/wencong/Documents/project-pro/erp-demo/erp-net/server"});
        put("ServiceImpl.vm", new String[]{"impl", "Impl", ".cs", "/Users/wencong/Documents/project-pro/erp-demo/erp-net/server"});
        put("duroadminasp/Controller.vm", new String[]{"Controllers", "Controller", ".cs", "/Users/wencong/Documents/project-pro/erp-demo/erp-net/webadmin"});
        put("Services.vm", new String[]{"service", "", ".ts", hmErpCloudVuePath + "/admin-vue/src/wen/modules"});
        put("Views.vm", new String[]{"views", "", ".vue", hmErpCloudVuePath + "/admin-vue/src/wen/modules"});
        put("Sql.vm", new String[]{"sql", "Sql", ".sql", null});
    }};
}
